'something'.match(/thing/);

'some things are just things'.match(/thing/);

const text = 'something';
const search = /thing/;
text.match(search);

const text = 'something';
const search = 'thing';
text.match(search);

function f(s: 'a' | 'b') {
  s.match('a');
}

type SafeString = string & { __HTML_ESCAPED__: void };
function f(s: SafeString) {
  s.match(/thing/);
}

function test(pattern: string) {
  'check'.match(new RegExp(pattern, undefined));
}